home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / docshell / nsIWebNavigation.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-08  |  16.4 KB  |  442 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIWebNavigation.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIWebNavigation_h__
  6. #define __gen_nsIWebNavigation_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIDOMDocument; /* forward declaration */
  18.  
  19. class nsIInputStream; /* forward declaration */
  20.  
  21. class nsISHistory; /* forward declaration */
  22.  
  23. class nsIURI; /* forward declaration */
  24.  
  25.  
  26. /* starting interface:    nsIWebNavigation */
  27. #define NS_IWEBNAVIGATION_IID_STR "f5d9e7b0-d930-11d3-b057-00a024ffc08c"
  28.  
  29. #define NS_IWEBNAVIGATION_IID \
  30.   {0xf5d9e7b0, 0xd930, 0x11d3, \
  31.     { 0xb0, 0x57, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c }}
  32.  
  33. /**
  34.  * The nsIWebNavigation interface defines an interface for navigating the web.
  35.  * It provides methods and attributes to direct an object to navigate to a new
  36.  * location, stop or restart an in process load, or determine where the object
  37.  * has previously gone.
  38.  *
  39.  * @status UNDER_REVIEW
  40.  */
  41. class NS_NO_VTABLE nsIWebNavigation : public nsISupports {
  42.  public: 
  43.  
  44.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBNAVIGATION_IID)
  45.  
  46.   /**
  47.    * Indicates if the object can go back.  If true this indicates that
  48.    * there is back session history available for navigation.
  49.    */
  50.   /* readonly attribute boolean canGoBack; */
  51.   NS_IMETHOD GetCanGoBack(PRBool *aCanGoBack) = 0;
  52.  
  53.   /**
  54.    * Indicates if the object can go forward.  If true this indicates that
  55.    * there is forward session history available for navigation
  56.    */
  57.   /* readonly attribute boolean canGoForward; */
  58.   NS_IMETHOD GetCanGoForward(PRBool *aCanGoForward) = 0;
  59.  
  60.   /**
  61.    * Tells the object to navigate to the previous session history item.  When a
  62.    * page is loaded from session history, all content is loaded from the cache
  63.    * (if available) and page state (such as form values and scroll position) is
  64.    * restored.
  65.    *
  66.    * @throw NS_ERROR_UNEXPECTED
  67.    *        Indicates that the call was unexpected at this time, which implies
  68.    *        that canGoBack is false.
  69.    */
  70.   /* void goBack (); */
  71.   NS_IMETHOD GoBack(void) = 0;
  72.  
  73.   /**
  74.    * Tells the object to navigate to the next session history item.  When a
  75.    * page is loaded from session history, all content is loaded from the cache
  76.    * (if available) and page state (such as form values and scroll position) is
  77.    * restored.
  78.    *
  79.    * @throw NS_ERROR_UNEXPECTED
  80.    *        Indicates that the call was unexpected at this time, which implies
  81.    *        that canGoForward is false.
  82.    */
  83.   /* void goForward (); */
  84.   NS_IMETHOD GoForward(void) = 0;
  85.  
  86.   /**
  87.    * Tells the object to navigate to the session history item at a given index.
  88.    *
  89.    * @throw NS_ERROR_UNEXPECTED
  90.    *        Indicates that the call was unexpected at this time, which implies
  91.    *        that session history entry at the given index does not exist.
  92.    */
  93.   /* void gotoIndex (in long index); */
  94.   NS_IMETHOD GotoIndex(PRInt32 index) = 0;
  95.  
  96.   /****************************************************************************
  97.    * The following flags may be bitwise combined to form the load flags
  98.    * parameter passed to either the loadURI or reload method.  Some of these
  99.    * flags are only applicable to loadURI.
  100.    */
  101. /**
  102.    * This flags defines the range of bits that may be specified.
  103.    */
  104.   enum { LOAD_FLAGS_MASK = 65535U };
  105.  
  106.   /**
  107.    * This is the default value for the load flags parameter.
  108.    */
  109.   enum { LOAD_FLAGS_NONE = 0U };
  110.  
  111.   /**
  112.    * This flag specifies that the load should have the semantics of an HTML
  113.    * Meta-refresh tag (i.e., that the cache should be bypassed).  This flag
  114.    * is only applicable to loadURI.
  115.    * XXX the meaning of this flag is poorly defined.
  116.    * XXX no one uses this, so we should probably deprecate and remove it.
  117.    */
  118.   enum { LOAD_FLAGS_IS_REFRESH = 16U };
  119.  
  120.   /**
  121.    * This flag specifies that the load should have the semantics of a link
  122.    * click.  This flag is only applicable to loadURI.
  123.    * XXX the meaning of this flag is poorly defined.
  124.    */
  125.   enum { LOAD_FLAGS_IS_LINK = 32U };
  126.  
  127.   /**
  128.    * This flag specifies that history should not be updated.  This flag is only
  129.    * applicable to loadURI.
  130.    */
  131.   enum { LOAD_FLAGS_BYPASS_HISTORY = 64U };
  132.  
  133.   /**
  134.    * This flag specifies that any existing history entry should be replaced.
  135.    * This flag is only applicable to loadURI.
  136.    */
  137.   enum { LOAD_FLAGS_REPLACE_HISTORY = 128U };
  138.  
  139.   /**
  140.    * This flag specifies that the local web cache should be bypassed, but an
  141.    * intermediate proxy cache could still be used to satisfy the load.
  142.    */
  143.   enum { LOAD_FLAGS_BYPASS_CACHE = 256U };
  144.  
  145.   /**
  146.    * This flag specifies that any intermediate proxy caches should be bypassed
  147.    * (i.e., that the content should be loaded from the origin server).
  148.    */
  149.   enum { LOAD_FLAGS_BYPASS_PROXY = 512U };
  150.  
  151.   /**
  152.    * This flag specifies that a reload was triggered as a result of detecting
  153.    * an incorrect character encoding while parsing a previously loaded
  154.    * document.
  155.    */
  156.   enum { LOAD_FLAGS_CHARSET_CHANGE = 1024U };
  157.  
  158.   /**
  159.    * If this flag is set, Stop() will be called before the load starts
  160.    * and will stop both content and network activity (the default is to
  161.    * only stop network activity).  Effectively, this passes the
  162.    * STOP_CONTENT flag to Stop(), in addition to the STOP_NETWORK flag.
  163.    */
  164.   enum { LOAD_FLAGS_STOP_CONTENT = 2048U };
  165.  
  166.   /**
  167.    * A hint this load was prompted by an external program: take care!
  168.    */
  169.   enum { LOAD_FLAGS_FROM_EXTERNAL = 4096U };
  170.  
  171.   /**
  172.    * Loads a given URI.  This will give priority to loading the requested URI
  173.    * in the object implementing    this interface.  If it can't be loaded here
  174.    * however, the URI dispatcher will go through its normal process of content
  175.    * loading.
  176.    *
  177.    * @param aURI
  178.    *        The URI string to load.  For HTTP and FTP URLs and possibly others,
  179.    *        characters above U+007F will be converted to UTF-8 and then URL-
  180.    *        escaped per the rules of RFC 2396.
  181.    * @param aLoadFlags
  182.    *        Flags modifying load behaviour.  This parameter is a bitwise
  183.    *        combination of the load flags defined above.  (Undefined bits are
  184.    *        reserved for future use.)  Generally you will pass LOAD_FLAGS_NONE
  185.    *        for this parameter.
  186.    * @param aReferrer
  187.    *        The referring URI.  If this argument is null, then the referring
  188.    *        URI will be inferred internally.
  189.    * @param aPostData
  190.    *        If the URI corresponds to a HTTP request, then this stream is
  191.    *        appended directly to the HTTP request headers.  It may be prefixed
  192.    *        with additional HTTP headers.  This stream must contain a "\r\n"
  193.    *        sequence separating any HTTP headers from the HTTP request body.
  194.    *        This parameter is optional and may be null.
  195.    * @param aHeaders
  196.    *        If the URI corresponds to a HTTP request, then any HTTP headers
  197.    *        contained in this stream are set on the HTTP request.  The HTTP
  198.    *        header stream is formatted as:
  199.    *            ( HEADER "\r\n" )*
  200.    *        This parameter is optional and may be null.
  201.    */
  202.   /* void loadURI (in wstring aURI, in unsigned long aLoadFlags, in nsIURI aReferrer, in nsIInputStream aPostData, in nsIInputStream aHeaders); */
  203.   NS_IMETHOD LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders) = 0;
  204.  
  205.   /**
  206.    * Tells the Object to reload the current page.  There may be cases where the
  207.    * user will be asked to confirm the reload (for example, when it is
  208.    * determined that the request is non-idempotent).
  209.    *
  210.    * @param aReloadFlags
  211.    *        Flags modifying load behaviour.  This parameter is a bitwise
  212.    *        combination of the Load Flags defined above.  (Undefined bits are
  213.    *        reserved for future use.)  Generally you will pass LOAD_FLAGS_NONE
  214.    *        for this parameter.
  215.    *
  216.    * @throw NS_BINDING_ABORTED
  217.    *        Indicating that the user canceled the reload.
  218.    */
  219.   /* void reload (in unsigned long aReloadFlags); */
  220.   NS_IMETHOD Reload(PRUint32 aReloadFlags) = 0;
  221.  
  222.   /****************************************************************************
  223.    * The following flags may be passed as the stop flags parameter to the stop
  224.    * method defined on this interface.
  225.    */
  226. /**
  227.    * This flag specifies that all network activity should be stopped.  This
  228.    * includes both active network loads and pending META-refreshes.
  229.    */
  230.   enum { STOP_NETWORK = 1U };
  231.  
  232.   /**
  233.    * This flag specifies that all content activity should be stopped.  This
  234.    * includes animated images, plugins and pending Javascript timeouts.
  235.    */
  236.   enum { STOP_CONTENT = 2U };
  237.  
  238.   /**
  239.    * This flag specifies that all activity should be stopped.
  240.    */
  241.   enum { STOP_ALL = 3U };
  242.  
  243.   /**
  244.    * Stops a load of a URI.
  245.    *
  246.    * @param aStopFlags
  247.    *        This parameter is one of the stop flags defined above.
  248.    */
  249.   /* void stop (in unsigned long aStopFlags); */
  250.   NS_IMETHOD Stop(PRUint32 aStopFlags) = 0;
  251.  
  252.   /**
  253.    * Retrieves the current DOM document for the frame, or lazily creates a
  254.    * blank document if there is none.  This attribute never returns null except
  255.    * for unexpected error situations.
  256.    */
  257.   /* readonly attribute nsIDOMDocument document; */
  258.   NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) = 0;
  259.  
  260.   /**
  261.    * The currently loaded URI or null.
  262.    */
  263.   /* readonly attribute nsIURI currentURI; */
  264.   NS_IMETHOD GetCurrentURI(nsIURI * *aCurrentURI) = 0;
  265.  
  266.   /**
  267.    * The referring URI for the currently loaded URI or null.
  268.    */
  269.   /* readonly attribute nsIURI referringURI; */
  270.   NS_IMETHOD GetReferringURI(nsIURI * *aReferringURI) = 0;
  271.  
  272.   /**
  273.    * The session history object used by this web navigation instance.
  274.    */
  275.   /* attribute nsISHistory sessionHistory; */
  276.   NS_IMETHOD GetSessionHistory(nsISHistory * *aSessionHistory) = 0;
  277.   NS_IMETHOD SetSessionHistory(nsISHistory * aSessionHistory) = 0;
  278.  
  279. };
  280.  
  281. /* Use this macro when declaring classes that implement this interface. */
  282. #define NS_DECL_NSIWEBNAVIGATION \
  283.   NS_IMETHOD GetCanGoBack(PRBool *aCanGoBack); \
  284.   NS_IMETHOD GetCanGoForward(PRBool *aCanGoForward); \
  285.   NS_IMETHOD GoBack(void); \
  286.   NS_IMETHOD GoForward(void); \
  287.   NS_IMETHOD GotoIndex(PRInt32 index); \
  288.   NS_IMETHOD LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders); \
  289.   NS_IMETHOD Reload(PRUint32 aReloadFlags); \
  290.   NS_IMETHOD Stop(PRUint32 aStopFlags); \
  291.   NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument); \
  292.   NS_IMETHOD GetCurrentURI(nsIURI * *aCurrentURI); \
  293.   NS_IMETHOD GetReferringURI(nsIURI * *aReferringURI); \
  294.   NS_IMETHOD GetSessionHistory(nsISHistory * *aSessionHistory); \
  295.   NS_IMETHOD SetSessionHistory(nsISHistory * aSessionHistory); 
  296.  
  297. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  298. #define NS_FORWARD_NSIWEBNAVIGATION(_to) \
  299.   NS_IMETHOD GetCanGoBack(PRBool *aCanGoBack) { return _to GetCanGoBack(aCanGoBack); } \
  300.   NS_IMETHOD GetCanGoForward(PRBool *aCanGoForward) { return _to GetCanGoForward(aCanGoForward); } \
  301.   NS_IMETHOD GoBack(void) { return _to GoBack(); } \
  302.   NS_IMETHOD GoForward(void) { return _to GoForward(); } \
  303.   NS_IMETHOD GotoIndex(PRInt32 index) { return _to GotoIndex(index); } \
  304.   NS_IMETHOD LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders) { return _to LoadURI(aURI, aLoadFlags, aReferrer, aPostData, aHeaders); } \
  305.   NS_IMETHOD Reload(PRUint32 aReloadFlags) { return _to Reload(aReloadFlags); } \
  306.   NS_IMETHOD Stop(PRUint32 aStopFlags) { return _to Stop(aStopFlags); } \
  307.   NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return _to GetDocument(aDocument); } \
  308.   NS_IMETHOD GetCurrentURI(nsIURI * *aCurrentURI) { return _to GetCurrentURI(aCurrentURI); } \
  309.   NS_IMETHOD GetReferringURI(nsIURI * *aReferringURI) { return _to GetReferringURI(aReferringURI); } \
  310.   NS_IMETHOD GetSessionHistory(nsISHistory * *aSessionHistory) { return _to GetSessionHistory(aSessionHistory); } \
  311.   NS_IMETHOD SetSessionHistory(nsISHistory * aSessionHistory) { return _to SetSessionHistory(aSessionHistory); } 
  312.  
  313. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  314. #define NS_FORWARD_SAFE_NSIWEBNAVIGATION(_to) \
  315.   NS_IMETHOD GetCanGoBack(PRBool *aCanGoBack) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCanGoBack(aCanGoBack); } \
  316.   NS_IMETHOD GetCanGoForward(PRBool *aCanGoForward) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCanGoForward(aCanGoForward); } \
  317.   NS_IMETHOD GoBack(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->GoBack(); } \
  318.   NS_IMETHOD GoForward(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->GoForward(); } \
  319.   NS_IMETHOD GotoIndex(PRInt32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->GotoIndex(index); } \
  320.   NS_IMETHOD LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadURI(aURI, aLoadFlags, aReferrer, aPostData, aHeaders); } \
  321.   NS_IMETHOD Reload(PRUint32 aReloadFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->Reload(aReloadFlags); } \
  322.   NS_IMETHOD Stop(PRUint32 aStopFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->Stop(aStopFlags); } \
  323.   NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocument(aDocument); } \
  324.   NS_IMETHOD GetCurrentURI(nsIURI * *aCurrentURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentURI(aCurrentURI); } \
  325.   NS_IMETHOD GetReferringURI(nsIURI * *aReferringURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReferringURI(aReferringURI); } \
  326.   NS_IMETHOD GetSessionHistory(nsISHistory * *aSessionHistory) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSessionHistory(aSessionHistory); } \
  327.   NS_IMETHOD SetSessionHistory(nsISHistory * aSessionHistory) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSessionHistory(aSessionHistory); } 
  328.  
  329. #if 0
  330. /* Use the code below as a template for the implementation class for this interface. */
  331.  
  332. /* Header file */
  333. class nsWebNavigation : public nsIWebNavigation
  334. {
  335. public:
  336.   NS_DECL_ISUPPORTS
  337.   NS_DECL_NSIWEBNAVIGATION
  338.  
  339.   nsWebNavigation();
  340.  
  341. private:
  342.   ~nsWebNavigation();
  343.  
  344. protected:
  345.   /* additional members */
  346. };
  347.  
  348. /* Implementation file */
  349. NS_IMPL_ISUPPORTS1(nsWebNavigation, nsIWebNavigation)
  350.  
  351. nsWebNavigation::nsWebNavigation()
  352. {
  353.   /* member initializers and constructor code */
  354. }
  355.  
  356. nsWebNavigation::~nsWebNavigation()
  357. {
  358.   /* destructor code */
  359. }
  360.  
  361. /* readonly attribute boolean canGoBack; */
  362. NS_IMETHODIMP nsWebNavigation::GetCanGoBack(PRBool *aCanGoBack)
  363. {
  364.     return NS_ERROR_NOT_IMPLEMENTED;
  365. }
  366.  
  367. /* readonly attribute boolean canGoForward; */
  368. NS_IMETHODIMP nsWebNavigation::GetCanGoForward(PRBool *aCanGoForward)
  369. {
  370.     return NS_ERROR_NOT_IMPLEMENTED;
  371. }
  372.  
  373. /* void goBack (); */
  374. NS_IMETHODIMP nsWebNavigation::GoBack()
  375. {
  376.     return NS_ERROR_NOT_IMPLEMENTED;
  377. }
  378.  
  379. /* void goForward (); */
  380. NS_IMETHODIMP nsWebNavigation::GoForward()
  381. {
  382.     return NS_ERROR_NOT_IMPLEMENTED;
  383. }
  384.  
  385. /* void gotoIndex (in long index); */
  386. NS_IMETHODIMP nsWebNavigation::GotoIndex(PRInt32 index)
  387. {
  388.     return NS_ERROR_NOT_IMPLEMENTED;
  389. }
  390.  
  391. /* void loadURI (in wstring aURI, in unsigned long aLoadFlags, in nsIURI aReferrer, in nsIInputStream aPostData, in nsIInputStream aHeaders); */
  392. NS_IMETHODIMP nsWebNavigation::LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders)
  393. {
  394.     return NS_ERROR_NOT_IMPLEMENTED;
  395. }
  396.  
  397. /* void reload (in unsigned long aReloadFlags); */
  398. NS_IMETHODIMP nsWebNavigation::Reload(PRUint32 aReloadFlags)
  399. {
  400.     return NS_ERROR_NOT_IMPLEMENTED;
  401. }
  402.  
  403. /* void stop (in unsigned long aStopFlags); */
  404. NS_IMETHODIMP nsWebNavigation::Stop(PRUint32 aStopFlags)
  405. {
  406.     return NS_ERROR_NOT_IMPLEMENTED;
  407. }
  408.  
  409. /* readonly attribute nsIDOMDocument document; */
  410. NS_IMETHODIMP nsWebNavigation::GetDocument(nsIDOMDocument * *aDocument)
  411. {
  412.     return NS_ERROR_NOT_IMPLEMENTED;
  413. }
  414.  
  415. /* readonly attribute nsIURI currentURI; */
  416. NS_IMETHODIMP nsWebNavigation::GetCurrentURI(nsIURI * *aCurrentURI)
  417. {
  418.     return NS_ERROR_NOT_IMPLEMENTED;
  419. }
  420.  
  421. /* readonly attribute nsIURI referringURI; */
  422. NS_IMETHODIMP nsWebNavigation::GetReferringURI(nsIURI * *aReferringURI)
  423. {
  424.     return NS_ERROR_NOT_IMPLEMENTED;
  425. }
  426.  
  427. /* attribute nsISHistory sessionHistory; */
  428. NS_IMETHODIMP nsWebNavigation::GetSessionHistory(nsISHistory * *aSessionHistory)
  429. {
  430.     return NS_ERROR_NOT_IMPLEMENTED;
  431. }
  432. NS_IMETHODIMP nsWebNavigation::SetSessionHistory(nsISHistory * aSessionHistory)
  433. {
  434.     return NS_ERROR_NOT_IMPLEMENTED;
  435. }
  436.  
  437. /* End of implementation class template. */
  438. #endif
  439.  
  440.  
  441. #endif /* __gen_nsIWebNavigation_h__ */
  442.